﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Text;

#endregion

namespace Weazel.Badger.Vhdl.Types
{
  public class BinaryTypeMap
  {
    public TypeId Left;
    public TypeId Right;
    public TypeId Result;

    private bool ignoreWidthDifference = false;
    public bool IgnoreWidthDifference
    {
      get
      {
        return ignoreWidthDifference;
      }

      set
      {
        ignoreWidthDifference = value;
      }
    }

    public BinaryTypeMap(TypeId left, TypeId right, TypeId result)
    {
      this.Left = left;
      this.Right = right;
      this.Result = result;
    }

    public BinaryTypeMap(TypeId left, TypeId right, TypeId result, bool ignoreWidthDifference) :
      this(left, right, result)       
    {
      this.ignoreWidthDifference = ignoreWidthDifference;
    }

    public override string ToString()
    {
      return string.Format("({0},{1}) -> {2}", Left, Right, Result);
    }
  }
}
